]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Fix indicator animation position
authorCarlos Soriano <carlos.soriano89@gmail.com>
Thu, 5 Sep 2013 22:39:07 +0000 (00:39 +0200)
committerCarlos Soriano <carlos.soriano89@gmail.com>
Fri, 13 Sep 2013 16:15:33 +0000 (18:15 +0200)
The original position was calculated with the stage and the
transformed position of the indicator when mapped. The values
were wrong on some situations, so lets calculate the position
based on the dots width.

https://bugzilla.gnome.org/show_bug.cgi?id=707580

js/ui/appDisplay.js

index 0d9c5958ff7bec22451f106b4a37897e92100647..5bd3ee2820824a8421373807d6c41f1caf2bec19 100644 (file)
@@ -233,13 +233,11 @@ const PageIndicators = new Lang.Class({
         let timePerChild = INDICATORS_ANIMATION_TIME / this._nPages;
         let delay = INDICATORS_ANIMATION_DELAY_PERCENTAGE / 100 * timePerChild;
 
-        let [stageX, ] = children[0].get_transformed_position();
         let offset;
-        let monitor = Main.layoutManager.primaryMonitor;
-        if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
-            offset = monitor.x - stageX - children[0].width;
+        if (this.actor.get_text_direction() == Clutter.TextDirection.RTL)
+            offset = -children[0].width;
         else
-            offset = monitor.x + monitor.width - stageX;
+            offset = children[0].width;
 
         for (let i = 0; i < this._nPages; i++) {
             children[i].translation_x = offset;